<!-- 发帖 -->
<template>
  <view class="content">
    <div class="button_area">
      <button @click="goToappointment()">
        <div class="button_1">
          <text class="words">{{text_1}}</text>
          <p class="arrow" style=" display: inline-block;">
            <image src="/static/icon/post/right.png" mode="aspectFill"
              style="height: 50px; width: 50px; vertical-align: text-bottom;"></image>
          </p>
        </div>
      </button>
      <button @click="goTotrade()">
        <div class="button_1">
          <text class="words">{{text_2}}</text>
          <p class="arrow" style=" display: inline-block;">
            <image src="/static/icon/post/right.png" mode="aspectFill"
              style="height: 50px; width: 50px; vertical-align: text-bottom;"></image>
          </p>
        </div>
      </button>
      <button @click="goTocoach()">
        <div class="button_1">
          <text class="words">{{text_3}}</text>
          <p class="arrow" style=" display: inline-block;">
            <image src="/static/icon/post/right.png" mode="aspectFill"
              style="height: 50px; width: 50px; vertical-align: text-bottom;"></image>
          </p>
        </div>
      </button>
      <button @click="goTodaily()">
        <div class="button_1">
          <text class="words">{{text_4}}</text>
          <p class="arrow" style=" display: inline-block;">
            <image src="/static/icon/post/right.png" mode="aspectFill"
              style="height: 50px; width: 50px; vertical-align: text-bottom;"></image>
          </p>
        </div>
      </button>
    </div>
    <div>
      <image src="/static/icon/pattern_1.png" class="pattern_1">
      </image>
    </div>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        text_1: '约    球',
        text_2: '装备交易',
        text_3: '教练陪练',
        text_4: '发 日 常',
      };
    },
    methods: {
      goToappointment() {
        if (!wx.getStorageSync('sessionID')) {
          uni.showToast({
            title: '请先登录!',
            icon: 'none',
            duration: 3000
          });
          return;
        }
        uni.navigateTo({
          url: '/pages/post/appointment'
        })
      },
      goTotrade() {
        if (!wx.getStorageSync('sessionID')) {
          uni.showToast({
            title: '请先登录!',
            icon: 'none',
            duration: 3000
          });
          return;
        }
        uni.navigateTo({
          url: '/pages/post/trade'
        })
      },
      goTocoach() {
        if (!wx.getStorageSync('sessionID')) {
          uni.showToast({
            title: '请先登录!',
            icon: 'none',
            duration: 3000
          });
          return;
        }
        uni.navigateTo({
          url: '/pages/post/coach'
        })
      },
      goTodaily() {
        if (!wx.getStorageSync('sessionID')) {
          uni.showToast({
            title: '请先登录!',
            icon: 'none',
            duration: 3000
          });
          return;
        }
        uni.navigateTo({
          url: '/pages/post/daily'
        })
      }
    }
  };
</script>

<style>
  page {
    height: 100vh;
    width: 100vw;
  }

  .content {
    background-image: url();
    /* 图片素材background_1.jpg */
    background-size: cover;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
  }

  .pattern_1 {
    position: absolute;
    height: 220px;
    width: 150px;
    left: 5%;
    bottom: 0%;
  }

  .button_area {
    margin-top: 100px;
  }

  button {
    background-color: #2d2d2d;
    border-radius: 10px;
    margin-bottom: 5%;
    height: 80px;
    width: 300px;
    border: 1px solid #bbbbbb;
    text-align: left;
    padding-top: 10px;
  }

  .words {
    color: #FFBF6B;
    font-size: 50px;
    line-height: 60px;
  }

  .arrow {
    float: right;
  }
</style>